import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty } from 'class-validator';

export class CommentArticleDto {
  @ApiProperty({
    example: '',
    description: '用户id',
  })
  @IsNotEmpty({ message: '用户id不能为空' })
  @IsString()
  userId: string;

  @ApiProperty({
    example: '',
    description: '评论内容',
  })
  @IsNotEmpty({ message: '评论内容不能为空' })
  @IsString()
  content: string;
}
